/**
 * Created by sicongdu on 17-11-3.
 */
const express = require('express');

const app = express();

var bodyParser = require('body-parser');
app.use(bodyParser());


// 设置 handlebars 视图引擎
var handlebars = require('express3-handlebars')
    .create({ defaultLayout:'main' });
app.engine('handlebars', handlebars.engine);
app.set('view engine', 'handlebars');

// var exphbs = require('express3-handlebars');
// app.engine('html', exphbs({
//     layoutsDir: 'views',
//     extname: '.hbs'
// }));
// app.set('view engine', 'html');


// var team = require("./team/app")
// app.use("/team", team);

var shitu = require("./Wi-Fi_station_weixin/shitu_back_end/tencentyoutuyun/sample")
app.use("/shitu", shitu);

var login = require("./login/login")
app.use("/login", login);

// var mark = require("./mark/app" )
// app.use("/mark", mark);
//
// var hackson = require("./hackson/app")
// app.use("/hackson", hackson);
//
// var donation = require("./donation_node/app")
// app.use("/donation", donation);

app.use(function(req, res, next){
    res.send("404");
});

const port = 8000;
app.listen(port);

console.log(`Server listening at http://127.0.0.1:${port}`);
